﻿using AgileShare.Framework.CamlQueries;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Xml.Linq;
using Microsoft.SharePoint.Publishing;

namespace AgileShare.Framework.Test
{
    
    
    /// <summary>
    ///这是 CrossListQueryBuilderTest 的测试类，旨在
    ///包含所有 CrossListQueryBuilderTest 单元测试
    ///</summary>
    [TestClass()]
    public class CrossListQueryBuilderTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///获取或设置测试上下文，上下文提供
        ///有关当前测试运行及其功能的信息。
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region 附加测试特性
        // 
        //编写测试时，还可使用以下特性:
        //
        //使用 ClassInitialize 在运行类中的第一个测试前先运行代码
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //使用 ClassCleanup 在运行完类中的所有测试后再运行代码
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //使用 TestInitialize 在运行每个测试前先运行代码
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //使用 TestCleanup 在运行完每个测试后运行代码
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///CrossListQueryBuilder 构造函数 的测试
        ///</summary>
        [TestMethod()]
        public void CrossListQueryBuilderConstructorTest()
        {
            CrossListQueryBuilder target = new CrossListQueryBuilder();
            Assert.Inconclusive("TODO: 实现用来验证目标的代码");
        }

        /// <summary>
        ///CrossListQueryBuilder 构造函数 的测试
        ///</summary>
        [TestMethod()]
        public void CrossListQueryBuilderConstructorTest1()
        {
            QueryLists lists = null; // TODO: 初始化为适当的值
            WebScope webScope = new WebScope(); // TODO: 初始化为适当的值
            CamlQueryBuilder camlQueryBuilder = null; // TODO: 初始化为适当的值
            bool useCache = false; // TODO: 初始化为适当的值
            Nullable<uint> rowLimit = new Nullable<uint>(); // TODO: 初始化为适当的值
            CrossListQueryBuilder target = new CrossListQueryBuilder(lists, webScope, camlQueryBuilder, useCache, rowLimit);
            Assert.Inconclusive("TODO: 实现用来验证目标的代码");
        }

        /// <summary>
        ///CrossListQueryBuilder 构造函数 的测试
        ///</summary>
        [TestMethod()]
        public void CrossListQueryBuilderConstructorTest2()
        {
            ListBaseType baseType = new ListBaseType(); // TODO: 初始化为适当的值
            WebScope webScope = new WebScope(); // TODO: 初始化为适当的值
            CamlQueryBuilder camlQueryBuilder = null; // TODO: 初始化为适当的值
            bool useCache = false; // TODO: 初始化为适当的值
            Nullable<uint> rowLimit = new Nullable<uint>(); // TODO: 初始化为适当的值
            CrossListQueryBuilder target = new CrossListQueryBuilder(baseType, webScope, camlQueryBuilder, useCache, rowLimit);
            Assert.Inconclusive("TODO: 实现用来验证目标的代码");
        }

        /// <summary>
        ///CrossListQueryBuilder 构造函数 的测试
        ///</summary>
        [TestMethod()]
        public void CrossListQueryBuilderConstructorTest3()
        {
            int serverTemplate = 0; // TODO: 初始化为适当的值
            WebScope webScope = new WebScope(); // TODO: 初始化为适当的值
            CamlQueryBuilder camlQueryBuilder = null; // TODO: 初始化为适当的值
            bool useCache = false; // TODO: 初始化为适当的值
            Nullable<uint> rowLimit = new Nullable<uint>(); // TODO: 初始化为适当的值
            CrossListQueryBuilder target = new CrossListQueryBuilder(serverTemplate, webScope, camlQueryBuilder, useCache, rowLimit);
            Assert.Inconclusive("TODO: 实现用来验证目标的代码");
        }

        /// <summary>
        ///CrossListQueryBuilder 构造函数 的测试
        ///</summary>
        [TestMethod()]
        public void CrossListQueryBuilderConstructorTest4()
        {
            IEnumerable<Guid> listIds = null; // TODO: 初始化为适当的值
            WebScope webScope = new WebScope(); // TODO: 初始化为适当的值
            CamlQueryBuilder camlQueryBuilder = null; // TODO: 初始化为适当的值
            bool useCache = false; // TODO: 初始化为适当的值
            Nullable<uint> rowLimit = new Nullable<uint>(); // TODO: 初始化为适当的值
            CrossListQueryBuilder target = new CrossListQueryBuilder(listIds, webScope, camlQueryBuilder, useCache, rowLimit);
            Assert.Inconclusive("TODO: 实现用来验证目标的代码");
        }

        /// <summary>
        ///AddAttributeIfNotNull 的测试
        ///</summary>
        [TestMethod()]
        [DeploymentItem("AgileShare.Framework.dll")]
        public void AddAttributeIfNotNullTest()
        {
            string attributeName = string.Empty; // TODO: 初始化为适当的值
            object value = null; // TODO: 初始化为适当的值
            XElement element = null; // TODO: 初始化为适当的值
            CrossListQueryBuilder_Accessor.AddAttributeIfNotNull(attributeName, value, element);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///BuildCrossListQueryCache 的测试
        ///</summary>
        [TestMethod()]
        public void BuildCrossListQueryCacheTest()
        {
            CrossListQueryBuilder target = new CrossListQueryBuilder(); // TODO: 初始化为适当的值
            CrossListQueryCache expected = null; // TODO: 初始化为适当的值
            CrossListQueryCache actual;
            actual = target.BuildCrossListQueryCache();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///BuildCrossListQueryInfo 的测试
        ///</summary>
        [TestMethod()]
        public void BuildCrossListQueryInfoTest()
        {
            CrossListQueryBuilder crossListQueryBuilder = null; // TODO: 初始化为适当的值
            CrossListQueryInfo expected = null; // TODO: 初始化为适当的值
            CrossListQueryInfo actual;
            actual = CrossListQueryBuilder.BuildCrossListQueryInfo(crossListQueryBuilder);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///BuildCrossListQueryInfo 的测试
        ///</summary>
        [TestMethod()]
        public void BuildCrossListQueryInfoTest1()
        {
            QueryLists lists = null; // TODO: 初始化为适当的值
            WebScope webScope = new WebScope(); // TODO: 初始化为适当的值
            CamlQueryBuilder camlQueryBuilder = null; // TODO: 初始化为适当的值
            bool useCache = false; // TODO: 初始化为适当的值
            Nullable<uint> rowLimit = new Nullable<uint>(); // TODO: 初始化为适当的值
            CrossListQueryInfo expected = null; // TODO: 初始化为适当的值
            CrossListQueryInfo actual;
            actual = CrossListQueryBuilder.BuildCrossListQueryInfo(lists, webScope, camlQueryBuilder, useCache, rowLimit);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///BuildCrossListQueryInfo 的测试
        ///</summary>
        [TestMethod()]
        public void BuildCrossListQueryInfoTest2()
        {
            ListBaseType baseType = new ListBaseType(); // TODO: 初始化为适当的值
            WebScope webScope = new WebScope(); // TODO: 初始化为适当的值
            CamlQueryBuilder camlQueryBuilder = null; // TODO: 初始化为适当的值
            bool useCache = false; // TODO: 初始化为适当的值
            Nullable<uint> rowLimit = new Nullable<uint>(); // TODO: 初始化为适当的值
            CrossListQueryInfo expected = null; // TODO: 初始化为适当的值
            CrossListQueryInfo actual;
            actual = CrossListQueryBuilder.BuildCrossListQueryInfo(baseType, webScope, camlQueryBuilder, useCache, rowLimit);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///BuildCrossListQueryInfo 的测试
        ///</summary>
        [TestMethod()]
        public void BuildCrossListQueryInfoTest3()
        {
            int serverTemplate = 0; // TODO: 初始化为适当的值
            WebScope webScope = new WebScope(); // TODO: 初始化为适当的值
            CamlQueryBuilder camlQueryBuilder = null; // TODO: 初始化为适当的值
            bool useCache = false; // TODO: 初始化为适当的值
            Nullable<uint> rowLimit = new Nullable<uint>(); // TODO: 初始化为适当的值
            CrossListQueryInfo expected = null; // TODO: 初始化为适当的值
            CrossListQueryInfo actual;
            actual = CrossListQueryBuilder.BuildCrossListQueryInfo(serverTemplate, webScope, camlQueryBuilder, useCache, rowLimit);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///BuildCrossListQueryInfo 的测试
        ///</summary>
        [TestMethod()]
        public void BuildCrossListQueryInfoTest4()
        {
            IEnumerable<Guid> listIds = null; // TODO: 初始化为适当的值
            WebScope webScope = new WebScope(); // TODO: 初始化为适当的值
            CamlQueryBuilder camlQueryBuilder = null; // TODO: 初始化为适当的值
            bool useCache = false; // TODO: 初始化为适当的值
            Nullable<uint> rowLimit = new Nullable<uint>(); // TODO: 初始化为适当的值
            CrossListQueryInfo expected = null; // TODO: 初始化为适当的值
            CrossListQueryInfo actual;
            actual = CrossListQueryBuilder.BuildCrossListQueryInfo(listIds, webScope, camlQueryBuilder, useCache, rowLimit);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///BuildCrossListQueryInfo 的测试
        ///</summary>
        [TestMethod()]
        public void BuildCrossListQueryInfoTest5()
        {
            CrossListQueryBuilder target = new CrossListQueryBuilder(); // TODO: 初始化为适当的值
            CrossListQueryInfo expected = null; // TODO: 初始化为适当的值
            CrossListQueryInfo actual;
            actual = target.BuildCrossListQueryInfo();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///BuildListsElement 的测试
        ///</summary>
        [TestMethod()]
        [DeploymentItem("AgileShare.Framework.dll")]
        public void BuildListsElementTest()
        {
            CrossListQueryBuilder_Accessor target = new CrossListQueryBuilder_Accessor(); // TODO: 初始化为适当的值
            XElement expected = null; // TODO: 初始化为适当的值
            XElement actual;
            actual = target.BuildListsElement();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///BuildWebsElement 的测试
        ///</summary>
        [TestMethod()]
        [DeploymentItem("AgileShare.Framework.dll")]
        public void BuildWebsElementTest()
        {
            CrossListQueryBuilder_Accessor target = new CrossListQueryBuilder_Accessor(); // TODO: 初始化为适当的值
            XElement expected = null; // TODO: 初始化为适当的值
            XElement actual;
            actual = target.BuildWebsElement();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///AudienceFieldId 的测试
        ///</summary>
        [TestMethod()]
        public void AudienceFieldIdTest()
        {
            CrossListQueryBuilder target = new CrossListQueryBuilder(); // TODO: 初始化为适当的值
            string expected = string.Empty; // TODO: 初始化为适当的值
            string actual;
            target.AudienceFieldId = expected;
            actual = target.AudienceFieldId;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///CamlQueryBuilder 的测试
        ///</summary>
        [TestMethod()]
        public void CamlQueryBuilderTest()
        {
            CrossListQueryBuilder target = new CrossListQueryBuilder(); // TODO: 初始化为适当的值
            CamlQueryBuilder expected = null; // TODO: 初始化为适当的值
            CamlQueryBuilder actual;
            target.CamlQueryBuilder = expected;
            actual = target.CamlQueryBuilder;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///FilterByAudience 的测试
        ///</summary>
        [TestMethod()]
        public void FilterByAudienceTest()
        {
            CrossListQueryBuilder target = new CrossListQueryBuilder(); // TODO: 初始化为适当的值
            bool expected = false; // TODO: 初始化为适当的值
            bool actual;
            target.FilterByAudience = expected;
            actual = target.FilterByAudience;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///GroupByAscending 的测试
        ///</summary>
        [TestMethod()]
        public void GroupByAscendingTest()
        {
            CrossListQueryBuilder target = new CrossListQueryBuilder(); // TODO: 初始化为适当的值
            bool expected = false; // TODO: 初始化为适当的值
            bool actual;
            target.GroupByAscending = expected;
            actual = target.GroupByAscending;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///GroupByAudience 的测试
        ///</summary>
        [TestMethod()]
        public void GroupByAudienceTest()
        {
            CrossListQueryBuilder target = new CrossListQueryBuilder(); // TODO: 初始化为适当的值
            bool expected = false; // TODO: 初始化为适当的值
            bool actual;
            target.GroupByAudience = expected;
            actual = target.GroupByAudience;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///Lists 的测试
        ///</summary>
        [TestMethod()]
        public void ListsTest()
        {
            CrossListQueryBuilder target = new CrossListQueryBuilder(); // TODO: 初始化为适当的值
            QueryLists expected = null; // TODO: 初始化为适当的值
            QueryLists actual;
            target.Lists = expected;
            actual = target.Lists;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///RowLimit 的测试
        ///</summary>
        [TestMethod()]
        public void RowLimitTest()
        {
            CrossListQueryBuilder target = new CrossListQueryBuilder(); // TODO: 初始化为适当的值
            Nullable<uint> expected = new Nullable<uint>(); // TODO: 初始化为适当的值
            Nullable<uint> actual;
            target.RowLimit = expected;
            actual = target.RowLimit;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///ShowUntargetedItems 的测试
        ///</summary>
        [TestMethod()]
        public void ShowUntargetedItemsTest()
        {
            CrossListQueryBuilder target = new CrossListQueryBuilder(); // TODO: 初始化为适当的值
            bool expected = false; // TODO: 初始化为适当的值
            bool actual;
            target.ShowUntargetedItems = expected;
            actual = target.ShowUntargetedItems;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///UseCache 的测试
        ///</summary>
        [TestMethod()]
        public void UseCacheTest()
        {
            CrossListQueryBuilder target = new CrossListQueryBuilder(); // TODO: 初始化为适当的值
            bool expected = false; // TODO: 初始化为适当的值
            bool actual;
            target.UseCache = expected;
            actual = target.UseCache;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///WebScope 的测试
        ///</summary>
        [TestMethod()]
        public void WebScopeTest()
        {
            CrossListQueryBuilder target = new CrossListQueryBuilder(); // TODO: 初始化为适当的值
            WebScope expected = new WebScope(); // TODO: 初始化为适当的值
            WebScope actual;
            target.WebScope = expected;
            actual = target.WebScope;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }

        /// <summary>
        ///WebUrl 的测试
        ///</summary>
        [TestMethod()]
        public void WebUrlTest()
        {
            CrossListQueryBuilder target = new CrossListQueryBuilder(); // TODO: 初始化为适当的值
            string expected = string.Empty; // TODO: 初始化为适当的值
            string actual;
            target.WebUrl = expected;
            actual = target.WebUrl;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }
    }
}
